package thread;

import form.GUI;
import javafx.application.Application;

public class GUIThread implements Runnable {

    private static final GUIThread INSTANCE = null;

    public void run() {
        //Display info about this particular thread
        System.out.println(Thread.currentThread());

        GUI window = new GUI();
        Application.launch(window.getClass());
        
       Thread.currentThread().interrupt();
       System.out.println("Now in GUI thread\n ");

    }

    public static GUIThread getInstance() {
        return GUIThreadHolder.INSTANCE;
    }

    private static class GUIThreadHolder {

        private static final GUIThread INSTANCE = new GUIThread();
    }
}
